﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Popups;

namespace MovingChame.WindowsStoreApp.Helpers
{
    public static class DialogHelper
    {
        public async static void ShowInformDialog(string message)
        {
            var messageDialog = new MessageDialog(message);
            messageDialog.Commands.Add(new UICommand("OK Chameleons!"));
            messageDialog.DefaultCommandIndex = 0;
            await messageDialog.ShowAsync();
        }

        public async static void ShowSelectionDialog(string message, UICommandInvokedHandler yesCommand, UICommandInvokedHandler noCommand)
        {
            var messageDialog = new MessageDialog(message);
            messageDialog.Commands.Add(new UICommand("Yes chameleons!", yesCommand));
            messageDialog.Commands.Add(new UICommand("Hey, wrong button!", noCommand));
            messageDialog.DefaultCommandIndex = 0;
            await messageDialog.ShowAsync();
        }
    }
}